from threading import Thread

def func(name):
    for i in range(1,100):
        print(name,"子线程ing")


if __name__ == "__main__":  # 主线程
    t1 = Thread(target=func,name="线程1")  # 子线程  args -- name  ("线程1",)  注意逗号
    t1.start() # 启动线程

    t2 = Thread(target=func,args=("线程2",))
    t2.start()

    for i in range(1,100):
        print("主线程ing")